Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regreet: respect dark mode and do not set extraCss #723

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

Mikilio
Copy link
Contributor

@Mikilio Mikilio commented Jan 3, 2025

ReGreet will choose dark colors from the GTK theme if we instruct it to do so.
ReGreet uses the global GTK theme if the environment is set the default Nixpkgs configuration takes care of that so extraCss will be left free for actual user overrides.

For regreet to be themed correctly, users need to start regreet with dbus environment. Nixpkgs does this by default but I don't know how to help people with special configurations.

Motivated by #690

Copy link
Collaborator

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For regreet to be themed correctly, users need to start regreet with dbus environment. Nixpkgs does this by default but I don't know how to help people with special configurations.

Any way for us to replicate Nixpkgs's behavior?

modules/regreet/nixos.nix Outdated Show resolved Hide resolved
@Mikilio
Copy link
Contributor Author

Mikilio commented Jan 4, 2025

Any way for us to replicate Nixpkgs's behavior?

Well, I guess I could trigger a warning that stylix may not style regreet correctly when regreet is misconfigured and can't get styled by global gtk. But that seems kind of common sense to me.

Misconfigured meaning that there are custom values under services.greetd when programs.regreet.enable = true

@Mikilio Mikilio requested a review from trueNAHO January 4, 2025 02:37
@trueNAHO
Copy link
Collaborator

trueNAHO commented Jan 4, 2025

Any way for us to replicate Nixpkgs's behavior?

Well, I guess I could trigger a warning that stylix may not style regreet correctly when regreet is misconfigured and can't get styled by global gtk. But that seems kind of common sense to me.

Sadly, it might not be obvious to people just installing Stylix without digging into the source code. Adding a warnings might be good, as probably nobody wants to unintentionally miss out on the theming.

Misconfigured meaning that there are custom values under services.greetd when programs.regreet.enable = true

That could be the condition of the warnings.

Copy link
Collaborator

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do a git rebase master and ensure that the CI passes. Then, you can locally run the CI for this PR with:

nix build .#checks.x86_64-linux.git-hooks

modules/regreet/nixos.nix Outdated Show resolved Hide resolved
modules/regreet/nixos.nix Outdated Show resolved Hide resolved
@Mikilio Mikilio force-pushed the fix-regreet branch 2 times, most recently from 186a69e to 747d75a Compare January 7, 2025 01:56
ReGreet will choose dark colors from the GTK theme if we instruct it to
do so.
ReGreet uses the global GTK theme if the environment is set the default
Nixpkgs configuration takes care of that so extraCss will be left free
for actual user overrides.
@Mikilio Mikilio requested a review from trueNAHO January 7, 2025 03:54
@trueNAHO trueNAHO enabled auto-merge (squash) January 7, 2025 18:35
@trueNAHO trueNAHO merged commit 5c84f02 into danth:master Jan 7, 2025
45 checks passed
@stylix-automation
Copy link

Successfully created backport PR for release-24.11:

stylix-automation bot pushed a commit that referenced this pull request Jan 7, 2025
Respect the stylix.polarity option and unset programs.regreet.extraCss
to enable custom styling.

This partially resolves the "ReGreet not using GTK or cursor theme" [1]
issue.

[1]: #690

Link: #723

Reviewed-by: NAHO <[email protected]>
(cherry picked from commit 5c84f02)
trueNAHO pushed a commit that referenced this pull request Jan 7, 2025
Respect the stylix.polarity option and unset programs.regreet.extraCss
to enable custom styling.

This partially resolves the "ReGreet not using GTK or cursor theme" [1]
issue.

[1]: #690

Link: #723

Reviewed-by: NAHO <[email protected]>
(cherry picked from commit 5c84f02)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants